home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Day Cry
/
Day Cry CD.bin
/
oh_towns
/
ein
/
sources
/
einlib.lzh
/
LIBSRC.LZH
/
EIN_FS04.C
< prev
next >
Wrap
C/C++ Source or Header
|
1994-07-18
|
2KB
|
74 lines
/*<Header>==============================================================
*
* STRINGS OPERATION / "EIN_ST04.C"
*
* [ EIN(tm) project : ò╢ÄÜù±æÇì∞òΓÅòè╓ÉöîQ ]
*
* COPYRIGHT Nam & é▌é±é╜é┴ü⌠ 1994, All rights reserved.
*
*-----------------------------------------------------------------------
* V1.0L01â┐ 94.07.16/Nam âvâìâgâ^âCâv(é▌é±é╜é┴ü⌠é│é±é╠è╓Éöé≡ùÿùp)
*</Header>==============================================================*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <snd.h>
#include <winb.h>
#include <te.h>
#include <fntb.h>
#include <gui.h>
#define EIN_FSTR
#include "..\eintm.h"
#ifndef NOERR
#define NOERR (0)
#endif
#ifndef ERROR
#define ERROR (1)
#endif
extern char *EIN_strrchr( char *, char );
/*<Func>================================================================
* int EIN_fnameDirectory( char *src, char *dst )
*
* üyèT ùvüz âpâXû╝é⌐éτâtâ@âCâïû╝é≡Å£éóé╜âfâBâîâNâgâèòöé≡ò╘é╡é▄é╖üB
*
* üyï@ ö\üz
*
* üyôⁿ ù═üz*src :
*
* üyÅo ù═üz*dst :
*
* üyè╓ÉöÆlüz ==0 É│ÅφÅIù╣
* !=0 ê┘ÅφÅIù╣
*
* üyÆì ê╙üz
*
* üyÄQ Å╞üz EIN_strrchr
*
*-----------------------------------------------------------------------
* V11L10 1994.07.16/Nam
*</Func>==============================================================*/
int EIN_fnameDirectory( char *src, char *dst )
{
char *fnp; /* âtâ@âCâïû╝ë≡É═â|âCâôâ^ */
register int ret = ERROR;
if ( src==NULL || dst==NULL ){
return ret;
}
if ( ((fnp = EIN_strrchr(src, '\\')) != NULL)|| /* âpâXÄwÆΦé═ùLéΘ? */
((fnp = EIN_strrchr(src, ':' )) != NULL)){ /* âhâëâCâuÄwÆΦé═? */
fnp++;
strncpy(dst, src, (fnp-src)); /* âpâXû╝âRâsü[ */
*(dst+(fnp-src)) = '\0';
ret = NOERR;
} else {
strcpy(dst,"");
}
return ret;
}